package com.ruibang.glass.produce.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author: songJinKang
 * @CreateTime: 2024-05-16  15:24
 * @Description: TODO
 * @Version: 1.0
 */
@Data
@ApiModel(value = "溶解缺陷取样详情")
@TableName("g_produce_defect_sample_item_detail")
public class DefectSampleItemDetail {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键ID")
    private String id;
    @ApiModelProperty(value = "样品ID")
    private String sampleItemId;
    @ApiModelProperty(value = "缺陷类型")
    private String defectType;
    @ApiModelProperty(value = "占比")
    private Double rate;
    @ApiModelProperty(value = "分类")
    @NotBlank(message = "分类不可空")
    private String classification;
    @ApiModelProperty(value = "数量")
    @NotNull(message = "数量不可为空")
    private Integer num;
    @ApiModelProperty("数据时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dataTime;
    @ApiModelProperty(value = "是否删除")
    @TableLogic
    private String isDelete;
}
